import { BrowserModule,DOCUMENT } from '@angular/platform-browser';
import { NgModule,NgZone } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { 
  IonicApp,AppRootToken
 } from './app-root';
import { OverlayPortalDirective } from '../directives/overlay-portal.directive';
import { UserRootComponent } from './user-root/user-root.component';
import {Platform,setupPlatform} from "./platform"
@NgModule({
  declarations: [
    IonicApp,
    OverlayPortalDirective,
    UserRootComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule
  ],
  entryComponents:[UserRootComponent],
  providers: [
    { provide: AppRootToken, useValue: UserRootComponent },
      { provide: Platform, useFactory: setupPlatform, deps: [ DOCUMENT, NgZone ] },
  ],
  bootstrap: [IonicApp]
})
export class AppModule { }
